<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <!-- 线性渐变 -->
  <style media="screen">
    .box {
      width:300px;
      height:300px;
      background:#CCC;
      margin:10px auto 0;
      background-image:-webkit-linear-gradient(left,red 50%,green 20%)
    }
  </style>
</head>
<body>
<div class='box'></div>
</body>
</html>
